/*
 * @Author: zhangweinan
 * @Date: 2023-07-18 13:25:12
 * @LastEditors: zhangweinan
 * @LastEditTime: 2023-07-19 23:55:39
 * @Description: file content
 * @FilePath: \cty-admin\src\views\dataAnalysis\config\content.config.js
 */
import { post } from "@/utils/request";
export const contentConfig = {
  pageMethod: "post",
  title: "table",
  showBack: true,
  propList: [
    { prop: "workDate", label: "日期", minWidth: "80" },
    { prop: "sn", label: "设备编号", minWidth: "180" },
    { prop: "name", label: "设备名称", minWidth: "120" },
    { prop: "description", label: "备注", minWidth: "120" },
    { prop: "ispName", label: "运营商", minWidth: "50" },
    {
      prop: "totalIncome",
      label: "收益",
      minWidth: "50",
    },
    { prop: "realBandWith", label: "有效带宽", minWidth: "80", slotName: "realBandWith", },
    {
      prop: "remark",
      label: "结算备注",
      minWidth: "120",
    }
  ],
  showIndexColumn: true,
  customRequestFn: (params) => {
    return post("/bandwidth/userDailyReportPage", params);
  },
  pageInfo: {
    loading: false,
    currentPage: 1,
    pageSize: 10,
    total: 0,
  },
};
export const contentConfigDev = {
  pageMethod: "post",
  title: "table",
  showBack: true,
  propList: [
    { prop: "userName", label: "用户名", minWidth: "120" },
    { prop: "phone", label: "用户手机号", minWidth: "120" },
    {
      prop: "deviceAllCount",
      label: "用户所有设备",
      minWidth: "120",

    },

    {
      prop: "monthActivityCount",
      label: "月度活跃数",
      minWidth: "120",
      sortable: true
    },

    { prop: "yesterdayActivityCount", label: "昨日活跃数", minWidth: "120", sortable: true },
    {
      prop: "monthActivityRate",
      label: "月度活跃率",
      minWidth: "120",
      sortable: true
    },
    {
      prop: "yesterdayActivityRate",
      label: "昨日活跃率",
      minWidth: "120",
      sortable: true
    },
    {
      prop: "onlineActivityRate",
      label: "线上活跃率",
      minWidth: "120",
      sortable: true
    },
  ],
  showIndexColumn: true,
  customRequestFn: (params) => {
    return post("/activity/activityPage", params);
  },
  childrenProps: {
    defaultSort:
      { prop: 'onlineActivityRate', order: 'descending' }
  },

  pageInfo: {
    loading: false,
    currentPage: 1,
    pageSize: 10,
    total: 0,
  },
};
